package com.xlzcx.xltz.controller;

import com.xlzcx.xltz.entity.ACarousel;
import com.xlzcx.xltz.filter.SkipLogin;
import com.xlzcx.xltz.service.a_carousel.ACarouselService;
import com.xlzcx.xltz.utils.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 作者: 李咨辰
 * 文件名: ACarouselController.java
 * 路径: com.xlzcx.xltz.controller
 * 时间: 2024-10-10 10:31
 * 版本: 1.0
 * 描述: TODO 轮播图
 **/

@RestController
@RequestMapping("/carousel")
public class ACarouselController {
    /**
     * 调用业务层
     */
    @Resource
    private ACarouselService aCarouselService;

    /**
     * 获取全部轮播图
     *
     * @return 轮播图数组对象
     */
    @SkipLogin
    @GetMapping("/getCarouselList")
    public R getCarouselList() {
        List<ACarousel> carouselList = aCarouselService.getCarouselList();
        return R.ok().put("data", carouselList);
    }
}
